﻿Public Class User
    Private id As Integer
    Private name As String
    Private birth As Date

    '共享 == 静态
    Public Shared product As Integer

    '属性
    Public Property IDProperty
        Get
            Return id
        End Get
        Set(value)
            id = value
        End Set
    End Property

    Public Property NameProperty
        Get
            Return name
        End Get
        Set(value)
            name = value
        End Set
    End Property

    Public Property BirthProperty
        Get
            Return birth
        End Get
        Set(value)
            birth = value
        End Set
    End Property

    Function Validate(name As String) As Boolean
        If name <> String.Empty Then
            Me.name = name
        End If
        Return True
    End Function

    '声明事件
    Public Event msgEvent As Action(Of String)
    Public Event msgEvent2(sender As Object, e As EventArgs)

    '声明委托
    Delegate Sub UserEventHandler(sender As Object, e As EventArgs)
End Class

Public Class AdminUser
    Inherits User
    Sub EventHandler(sender As Object, e As EventArgs) Handles MyBase.msgEvent2
        '
    End Sub


End Class